package com.itheima.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class HelloJob {

    @Scheduled(cron = "0/9 * * * * ?")
    public void eat(){
        System.out.println("----------每隔5秒吃一次饭:"+new Date());
    }
}
